home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / cc / g++-dist / README < prev    next >
Encoding:
Text File  |  1990-03-01  |  11.4 KB  |  288 lines

  1. This is the file README.  It documents release 1.37.0 of the GNU C++
  2. compiler system, still in test release status.  All bugs reported for
  3. previous test releases have been fixed.  Some bugs surely remain.
  4. To see the list of current issues/bugs in GNU C++, look at the file
  5. dist-g++/ideas, or see the BugList section of the GNU C++ Users Guide.
  6.  
  7. See the file HINTS for special clues relating to GNU C++ configuration
  8. and troubleshooting.
  9.  
  10. Introduction.
  11.  
  12. GNU C++ is GNU CC, with a C++ front end.  GNU CC is the Free Software
  13. Foundation's optimizing, retargetable, ANSI C compiler.  GNU CC has
  14. source level debugging support from the GDB debugger (also available
  15. from the Free Software Foundation).  For more information about GNU
  16. CC, write to the Free Software Foundation at the address given below.
  17. GNU C++ is an extension of GNU CC.  It keeps the powerful optimizer,
  18. and maintains a high degree of source-level debugging support, while
  19. providing the object-oriented features of C++.  Numerous files have
  20. been added, changed, and hacked without mercy from their original GNU
  21. CC incarnation to make this compiler accept a reasonable super/subset
  22. of C++.
  23.  
  24. *Disclaimer*: GNU C++ is not perfectly compatible with AT&T
  25. C++.  It is, however, a reasonably faithful implementation of C++ as
  26. described in the C++ reference manual.  To make GNU C++ more mobile,
  27. only the files that are not shared with GNU CC are currently being
  28. distributed.  If you do not have GNU CC yet, or your version is older
  29. than 1.37, you should take care of getting that first.  GNU CC is
  30. available to sites which have anonymous ftp capability to
  31. prep.ai.mit.edu.  Contact the Free Software Foundation for more
  32. information.
  33.  
  34. GNU C++ is still under development, but has stabilized (hopefully) to
  35. the point where bug fixes will not require major implementation or
  36. reimplementation.  The purpose of this distribution is to give
  37. interested parties a chance to start working with a free C++ compiler.
  38. It is expected (and hoped) that this compiler will continue to evolve
  39. at a fairly rapid pace.  I am hoping to receive not just bug reports,
  40. but also code contributions, new features, and anything else that
  41. makes GNU C++ a better compiler.
  42.  
  43. Documentation for GNU C++ does not really exist.  If you would like to
  44. write some, more power to you.  What does exist is in the file
  45. dist-g++/g++.texinfo .
  46.  
  47. GNU C++ is no longer distributed with a special debugger.  The
  48. current version of GDB needed to debug GNU C++ program is version 3.4,
  49. which can be gotten from prep.ai.mit.edu in the usual way.
  50.  
  51. Currently, the debugger supports all of the features of the compiler,
  52. except for: new and delete, operator forms of new and delete, user
  53. defined type conversion, and multiple inheritance when multiple
  54. inheritance must actually be used.  The reason for these exceptions is
  55. the degree of difficulty of their implementation.  I am waiting until
  56. I see a clean, general way of doing it.  Until then, I would
  57. appreciate any input (thoughts, caveats, source code) you would like
  58. to provide.
  59.  
  60. A name demangler has been provided by James Clark.  Here is the text
  61. from his README file:
  62.  
  63.     This package contains a demangler for GNU C++ version 1.37
  64.     (November 6 version); it will probably require work for other
  65.     versions.
  66.  
  67.     It has *not* been extensively tested, so use with caution.
  68.  
  69.     Demangling converts an encoded g++ symbol name approximately into
  70.     the form of a C++ declaration.
  71.  
  72.     cplus-dem.c provides a self-contained implementation of the
  73.     demangling function cplus_demangle.
  74.  
  75.     g++filt.c is a simple filter that illustrates the use of
  76.     cplus_demangle.  It has a similar function to the c++filt program
  77.     provided for cfront 2.0.  It filters its input replacing encoded
  78.     g++ symbol names by their demangled equivalents. Anything not part
  79.     of a g++ symbol name is passed through unchanged. It can be used
  80.     to filter the output of, for example, gprof or nm.
  81.  
  82.     ld.c.patch contains a rather ugly patch to ld.c (the version which
  83.     comes with g++) to make it use cplus_demangle for printing the
  84.     names of undefined symbols when a -lg++ option is given.
  85.  
  86.     James Clark
  87.     jjc@jclark.uucp
  88.  
  89. GNU C++ was originally developed on a Sun-3 workstation, running Sun's
  90. OS 3.5, and was migrated to a Sun-4 workstation, running Sun's OS 4.0
  91. (Berkeley 4.2 compatible with some System V enhancements).  The GNU
  92. C++ library was developed on a VAX 11/750 running BSD 4.3, and is now
  93. being developed on a Sun-4 workstation as well.  If you have machines
  94. other than these, or any kind of machine running System V, you may
  95. experience installation difficulties due to conditions which I cannot
  96. anticipate.  I will try to help you with problems on these machines,
  97. but my primary goal is supporting GNU C++, and not System V (or VMS).
  98.  
  99. Installation of GNU C++. (From distribution tape)
  100.  
  101. Select the directory in your file system where GNU code usually goes.
  102. If this is your first GNU code, then you have probably not installed
  103. GNU CC.  Please install it, and then continue with these instructions.
  104. In this directory, you should have the subdirectories
  105.  
  106.     gcc-1.37/
  107.     gcc/    linked to ->    gcc-1.37
  108.     gcc-test/
  109.  
  110. and possibly others.  Unload the tape by using the tar command.
  111.  
  112.     install% tar xvf TARFILE
  113.  
  114. where TARFILE is either the name of a tar file if you got the
  115. distribution via ftp, or is the name of the tape device on which the
  116. release tape is held.
  117.  
  118. Your directory tree should now contain the additional file
  119.  
  120.     g++-1.37.0/
  121.  
  122. If you have specifically requested that the GNU C++ library be
  123. included on the tape that we make for you, you will also have the
  124. directory
  125.  
  126.     libg++-1.37.0/
  127.  
  128. If you got this tar file electronically instead of by tape, these
  129. directories will come from separate tar files.
  130.  
  131. The GNU C++ library contains header files such as `stdio.h',
  132. `stream.h', etc., which are useful when trying examples from the book.
  133. It also contains a number of useful classes which serve both as
  134. function program units, as well as example C++ code.
  135.  
  136. The code for GNU C++ is in the directory g++-1.37.0/.  Here is how to
  137. install GNU C++:
  138.  
  139. (1) Make a directory, e.g. g++/ and `cd' into it
  140.  
  141.     install% mkdir g++
  142.     install% cd g++
  143.  
  144. (2) Make symbolic links from all files in the g++-1.37.0 directory
  145.     to the current g++ directory, i.e., ln -s ../g++-1.37.0/* .
  146.  
  147. (3) Read carefully the comments at the top of the Makefile, to see
  148.     what flags, you will need to modify, if any.  For example, if you
  149.     have a System V machine, you may have to uncomment the line which
  150.     defines USG_STDIO.
  151.  
  152. (4) Do a `make' of the "maketest" target in the Makefile.  If your
  153.     directory structure is as described here, you need not give any
  154.     additional arguments.  Otherwise, you must set DIR to the
  155.     directory which contains GNU CC sources, and TDIR to the directory
  156.     which contains GNU CC object files.  The variable CDIR is the
  157.     directory for GNU CC's machine-specific files.  You do not need to
  158.     explicitly give this a value unless you have moved GNU CC's
  159.     "config" directory relative to the DIR director.
  160.  
  161. The error messages about links that could not be made should be
  162. ignored.
  163.  
  164. (5) Configure the compiler for the machine target you want.  This is
  165.     accomplished by running the program "config.g++".  For example, on
  166.     a Sun4 running SunOS 4.0, you would type:
  167.  
  168.     install% config.g++ sun4-os4
  169.  
  170. Now, You should still be in the directory g++/:
  171.  
  172.     install% pwd
  173.     ./g++
  174.     install% 
  175.  
  176. If GAS and GNU LD work for your machine, *use them*.  That will permit
  177. you to use the system's crt0.o, including mcrt0.o and gcrt0.o which
  178. support profiling and other features.  Said another way, if you use
  179. GNU ld and GNU as, don't use special crt0.o!
  180.  
  181. To install GAS, you should have release 1.34 or greater.  Since GAS
  182. and GNU C/C++ do not share source code, there is no need to try to
  183. match GAS and GNU C/C++ version numbers.  To install GAS in such a way
  184. that GNU C/C++ can find it, install it as `gcc-as' wherever `gcc-cc1'
  185. and `gcc-cc1plus' are installed.  Usually this is
  186. `/usr/local/lib/gcc-as'.  Similarly install GNU LD as `gcc-ld' where
  187. `gcc-cc1' and friends are installed, usually `/usr/local/lib/gcc-ld'.
  188.  
  189. GNU LD will not work if your system uses COFF object files.  In
  190. this case, use the `collect' program.
  191.  
  192. If neither GNU LD or `collect' works, use collect2.c.  (In
  193. particular, use it on Convex machines.)  To use collect2.c, your
  194. system must support the -r flag of ld.  Edit collect2.c if
  195. necessary to tell it about your assembler syntax, then compile it
  196. with gcc and install it as /usr/local/lib/gcc-ld.
  197.  
  198. *Very Important* [For non-GAS users]: If you do not use GAS, GNU C++
  199. may need to use its own crt0.c, borrowed and modified from GNU Emacs.
  200. You should verify that the crt0.c provided is fed suitable definitions
  201. for correct compilation.  If you have GNU Emacs, and you are not
  202. compiling to a SUN, consult your local GNU Emacs guru, to see what
  203. sort of #defines are required for proper operation.
  204.  
  205. In any event, at this point, just type `make':
  206.  
  207.     install% make
  208.  
  209. If you are not using a SUN, you will need to use the appropriate
  210. machine dependent files, as per GNU CC.  If you do not provide a
  211. proper crt0.c, any executable produced by GNU C++ may fail to run at
  212. all.  Conversely, if you have a program which does not make it as far
  213. as the first line in main (), you have probably failed to provide the
  214. correct flags to the compiler when building crt0.c.
  215.  
  216. You have now just made GNU C++.  Having done that, you should now
  217. proceed to use GNU C++ to build the GNU C++ run-time libraries, which
  218. are in the directory dist-libg++/ .  This code was contributed
  219. by Doug Lea, and implements streams, obstacks, structured files, and
  220. other C++ public service objects.  The README in that directory
  221. explains the installation procedure for that code.  Also, by making
  222. the library and running the test programs (the Makefile in
  223. dist-libg++/ will tell you what to do), you can verify that GNU
  224. C++ has been properly installed.
  225.  
  226. Installation of GDB.
  227.  
  228. GNU C++ and GDB 3.4 are intended to be compatible.  GDB+ no longer
  229. exists.  Read installation instructions provided in dist-gdb.
  230.  
  231. Suggestions.
  232.  
  233. I suggest making all of the files in ../gcc/ read-only, so that when
  234. you are making modifications to files of GNU C++, you will notice when
  235. new ground is being broken.  It also helps to know what files can be
  236. updated from the standard GNU software without impacting GNU C++.  For
  237. example, if there is a bug fix for the file `cse.c', that same fix
  238. applies to GNU CC and GNU C++.  With both compilers pointing to the
  239. same directory via symbolic links, one need not concern oneself
  240. with those changes.
  241.  
  242. Have fun!
  243.  
  244. Michael Tiemann
  245.  
  246. 11/6/89
  247.  
  248. For more information.
  249.  
  250. For questions concerning GNU CC and GDB, the Free Software Foundation
  251. maintains the following address:
  252.  
  253.     The Free Software Foundation
  254.     675 Massachusetts Avenue
  255.     Cambridge, Mass
  256.     02139
  257.  
  258.     Phone: (617) 876 - 3296
  259.  
  260. For questions which cannot be answered by the Free Software
  261. Foundation, please contact Michael Tiemann directly:
  262.  
  263.     Michael Tiemann
  264.     16361 Skyline Blvd
  265.     Woodside, CA
  266.     94062
  267.  
  268.     Phone: (415) 851-4027
  269.     ARPA Email: tiemann@lurch.stanford.edu
  270.             tiemann@wheaties.ai.mit.edu (will forward to Stanford).
  271.  
  272. Cygnus Support provides commercial support for GNU C++ on a fixed-fee
  273. basis.  If you want support, or have support-related questions, please
  274. contact:
  275.  
  276.     Cygnus Support
  277.     814 University Avenue
  278.     Palo Alto, CA
  279.     94301
  280.  
  281.     Phone: (415) 322-3811
  282.  
  283. Software from the Free Software Foundation is provided with absolutely
  284. no warranty, to the extent permitted by applicable state law.
  285. Redistribution of its code (source and/or executable) by MCC does not
  286. imply that MCC offers a warranty for such code.
  287.  
  288.